package com.zhiyou100.video.webaction.tloos;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.zhiyou100.video.model.Admin;

@SuppressWarnings("all")
public class FilterInterceptor extends MethodFilterInterceptor{

	@Override
	protected String doIntercept(ActionInvocation Invocation) throws Exception {
		Admin ad = (Admin) ActionContext.getContext().getSession().get("admin");
		if(ad==null){
			return "login";
		}
		return Invocation.invoke();
	}

}
